package conf

import (
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
)



func GetData(xFile string) []byte {
	if _, err := os.Stat(xFile); err != nil {
		panic(errors.New(fmt.Sprintf("file:%s not found", xFile)))
	}
	fileAbsPath, err := filepath.Abs(xFile)

	if err != nil {
		panic(err)
	}

	data, err := ioutil.ReadFile(fileAbsPath)
	if err != nil {
		panic(err)
	}
	return data
}
